package com.happe.foodeasy.system.entity;

import com.happe.foodeasy.constraint.annotation.EntityCustom;
import com.happe.foodeasy.constraint.annotation.StringTypeMetadata;
import com.happe.foodeasy.relation.annotation.ManyToOneCustom;
import com.happe.foodeasy.common.CommonInfoEntity;

/**
 * this class is the entity of image that can link to another url.
 * Created by wubin on 2016-05-08.
 */
@EntityCustom
public class LinkedImage extends CommonInfoEntity{
    @StringTypeMetadata(typeLength = 100)
    private String targetUrl;

    @StringTypeMetadata()
    private String imageName;

    private byte[] imageByte;
    @ManyToOneCustom
    private ImageTargetPosition imageTargetPosition;

    public String getTargetUrl() {
        return targetUrl;
    }

    public void setTargetUrl(String targetUrl) {
        this.targetUrl = targetUrl;
    }

    public String getImageName() {
        return imageName;
    }

    public void setImageName(String imageName) {
        this.imageName = imageName;
    }

    public byte[] getImageByte() {
        return imageByte;
    }

    public void setImageByte(byte[] imageByte) {
        this.imageByte = imageByte;
    }

    public ImageTargetPosition getImageTargetPosition() {
        return imageTargetPosition;
    }

    public void setImageTargetPosition(ImageTargetPosition imageTargetPosition) {
        this.imageTargetPosition = imageTargetPosition;
    }
}
